 function lookup(inputString,page) {

		
			$.post("search", {name: ""+inputString+"",type: "display",
                                          page:""+page+""
                                          },
                                        function(data){                                       
				if(data.length >0) {
					$('#tabledata').html(data);
				}
			});
		
	} // lookup

	function fill(inputString,page) {

                if(inputString.length == 0) {
			// Hide the suggestion box.
                        $('#tabledata').show();
			$('#suggestions').hide();
		} else {

			$.post("search", {adminId: ""+inputString+"",type: "display",
                                          page:""+page+""},
                                        function(data){

				if(data.length >0) {
                                        $('#suggestions').hide();
                                        $('#tabledata').show();
					$('#tabledata').html(data);
				}
			});
		}
	}
        function confirmRole(urlthis,id){
            var confirmation= confirm("Anda Yakin Untuk Mengubah Peran?");
            if (confirmation== true)
            {
                //$.post("search",{adminId:""+admin_id,id: ""+input+"",type: "change"},
                                        //function(data){
                                        //    alert("Ubah Peran Berhasil");
                                        //});
            window.location.href =urlthis+'/id/'+id;
            }else{

            }
        }
         function deleting(urlthis){
            var confirmation= confirm("Anda Yakin Untuk menghapus akun ini?");
          if (confirmation== true)
            {
              //  $.post("remove",{id:""+id},
             //                           function(data){
              //                            alert('Akun telah terhapus');
                                         
               //                         });
 
          // simulates similar behavior as an HTTP redirect
            window.location.href =urlthis;

          }else{

            }
}
         function sorting(method,field,page){

          
                $.post("search",{method:""+method,field:""+field,type: "sorting",
                                          page:""+page+""},
                                        function(data){
                                        
                                      if(data.length >0) {
                                          
					$('#tabledata').html(data);
				}
                                        });

}